package com.tihi.handsuiviewer;

import ofs.ahd.dii.AdManager;
import android.app.Application;


import com.tihi.handsuiviewer.AppDef.YOUMI;
import com.tihi.util.AppUtils;

import de.greenrobot.event.EventBus;

/**
 * APP
 * @author duantihi
 * @date 2016-1-30 下午1:14:39
 */
public class App extends Application{
	private static App _instance;
	private static EventBus appEventBus;
	
	@Override
	public void onCreate() {
		super.onCreate();
		//FIXME, 发布时改为false
		AdManager.getInstance(this).init(YOUMI.APP_ID, YOUMI.APP_SECRET, false);
		_instance = this;
		appEventBus = new EventBus();
		AppUtils.newDir(AppDef.CACHE_ROOT);
	}
	
	public static App instance() {
		return _instance;
	}
	
	public static EventBus getAppEventBus() {
		return appEventBus;
	}

}
